overview-container.ts ➔ createSVGContainer   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 9
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 9
rs 9.95
c 0
b 0
f 0
cc 1
1
import { selectById } from '../utils/helpers/Selectors';
2
import { ElementIds } from '../utils/AppConsts';
3
4
export function createSVGContainer(width: number, height: number) {
5
    return selectById(ElementIds.OVERVIEW_CONTAINER_DIV)
6
        .append('svg')
7
        .attr('id', ElementIds.OVERVIEW_CONTAINER)
8
        .attr('preserveAspectRatio', 'xMidYMid meet')
9
        .attr('viewBox', `0 0 ${width} ${height}`)
10
        .attr('width', width)
11
        .attr('height', height);
12
}
13